using Core;
using Core.Domain.Bases;
using Core.Domain.Entities;

namespace TallyJ.Announcer
{
  ///<summary>Data for the view</summary>
  internal class AnnouncerDataContext
  {
#pragma warning disable 649
    private IndependentWrapper<Person> _upcoming1;
    private IndependentWrapper<Person> _upcoming2;
    private IndependentWrapper<Person> _upcoming3;
    private IndependentWrapper<Person> _current;
    private IndependentWrapper<Person> _past1;
#pragma warning restore 649

    public AnnouncerDataContext()
    {
      this.CreateIndependentInstances();
    }

    ///<summary></summary>
    public virtual Person PastPerson1
    {
      get { return _past1.Value; }
      set { _past1.Value = value; }
    }

    ///<summary></summary>
    public virtual Person Current
    {
      get { return _current.Value; }
      set { _current.Value = value; }
    }

    ///<summary></summary>
    public virtual Person UpcomingPerson1
    {
      get { return _upcoming1.Value; }
      set { _upcoming1.Value = value; }
    }

    ///<summary></summary>
    public virtual Person UpcomingPerson2
    {
      get { return _upcoming2.Value; }
      set { _upcoming2.Value = value; }
    }

    ///<summary></summary>
    public virtual Person UpcomingPerson3
    {
      get { return _upcoming3.Value; }
      set { _upcoming3.Value = value; }
    }

    public string CurrentName
    {
      get { return Current.DisplayName(); }
    }

    public string CurrentOtherName
    {
      get
      {
        return string.Empty;
        // return Current.Participation();
      }
    }

    public string Past1OtherName
    {
      get { return PastPerson1.OtherNames(); }
    }

    public string Past1Name
    {
      get { return PastPerson1.DisplayName(); }
    }

    public string Upcoming1Name
    {
      get { return UpcomingPerson1.DisplayName(); }
    }

    public string Upcoming1OtherName
    {
      get { return UpcomingPerson1.OtherNames(); }
    }

    public string Upcoming2Name
    {
      get { return UpcomingPerson2.DisplayName(); }
    }

    public string Upcoming2OtherName
    {
      get { return UpcomingPerson2.OtherNames(); }
    }

    public string Upcoming3Name
    {
      get { return UpcomingPerson3.DisplayName(); }
    }

    public string Upcoming3OtherName
    {
      get { return UpcomingPerson3.OtherNames(); }
    }
  }
}